package com.lhx.product.controller;

import com.lhx.common.core.domain.R;
import com.lhx.product.domain.MemberPrice;
import com.lhx.product.ser.MemberLevelService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author：李洪祥
 * @Package：com.lhx.product.controller
 * @Project：lhx-RuoYi
 * @name：MemberLevelController
 * @Date：2024/6/6 下午4:51
 */
@RestController
@RequestMapping("/memberLevel")
public class MemberLevelController {

    @Autowired
    private MemberLevelService memberLevelService;

    @ApiOperation("查询所有会员等级")
    @GetMapping(value = "/list")
    @ResponseBody
    public R<List<MemberPrice>> list(@RequestParam("defaultStatus") Integer defaultStatus) {
        List<MemberPrice> memberLevelList = memberLevelService.list(defaultStatus);
        return R.ok(memberLevelList);
    }
}
